/**
 *统计：每日新增记录柱状图配置
 */
export const newRecordOptions = {
  title: {
    text: '每日新增记录',
    textStyle: {
      fontWeight: 400,
      fontSize: 16
    },
    subtext: '范围：本月',
    subtextStyle: {
      fontSize: 14,
      color: '#666'
    },
    padding: [5, 20]
  },
  color: ['#2ACFD2'],
  tooltip: {
    trigger: 'axis',
    axisPointer: { // 坐标轴指示器，坐标轴触发有效
      type: 'shadow' //  默认为直线，可选为：'line' | 'shadow'
    }
  },
  legend: {
    x: 'left',
    left: '10%',
    top: '20%',
    textStyle: {
      color: '#666',
      fontSize: 14
    },
    itemWidth: 10,
    itemHeight: 10,
    data: ['记录数量']
  },
  grid: {
    left: '10%',
    right: '10%',
    top: '30%',
    bottom: '15%',
    containLabel: true
  },
  xAxis: [
    {
      type: 'category',
      data: ['4s店', '京东', '天猫', '空', '苏宁'],
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      },
      name: '购买渠道',
      nameLocation: 'center',
      nameTextStyle: {
        fontSize: 14,
        color: '#333',
        padding: 30
      }
    }
  ],
  yAxis: [
    {
      type: 'value',
      axisLine: {
        show: false
      },
      axisTick: {
        show: false
      }
    }
  ],
  series: [
    {
      name: '记录数量',
      type: 'bar',
      barWidth: 24,
      data: [1, 3, 1, 1, 1]
    }
  ]
}
/**
 *统计：资产类别饼图配置
 */
export const categoryOptions = {
  color: ['#018CFE', '#34A3FE', '#67BAFE', '#99D1FF'],
  title: {
    text: '资产类别',
    textStyle: {
      fontWeight: 400,
      fontSize: 16
    },
    subtext: '范围：本月',
    subtextStyle: {
      fontSize: 14,
      color: '#666'
    },
    padding: [10, 20],
  },
  tooltip: {
    trigger: 'item',
    formatter: "{a} <br/>{b} : {c} ({d}%)"
  },
  series: [
    {
      name: '资产类别',
      type: 'pie',
      radius: ['30%', '60%'],
      avoidLabelOverlap: false,
      label: {
        normal: {
          formatter: '{b}{text|(}{d}%{text|)}',
          rich: {
            text: {
              color: '#333',
              align: 'left',
              fontSize: 14,
            },
          },
          height: 40,
          color: '#666',
          fontSize: 14,
          padding: [0, -100],
        }
      },
      labelLine: {
        normal: {
          length: 25, // 折线
          length2: 100 // 文字下面的线
        }

      },
      data: [
        {value: 6, name: '软件'},
        {value: 4, name: '手机'},
        {value: 8, name: '汽车'},
        {value: 11, name: '笔记本'},
      ]
    }
  ]
}
